package com.example.infrastructure.persistence.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.infrastructure.common.BasePO;
import java.io.Serializable;
import java.math.BigDecimal;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 处方表 PO
 *
 * @author wangal
 * @since 2025-07-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("prescriptions")
@Schema(name = "Prescriptions", description = "处方表")
public class Prescriptions extends BasePO {

    private static final long serialVersionUID = 1L;

    @Schema(description = "处方单号")
    @TableField("prescription_no")
    private String prescriptionNo;

    @Schema(description = "问诊ID")
    @TableField("consultation_id")
    private Long consultationId;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "医生ID")
    @TableField("doctor_id")
    private Long doctorId;

    @Schema(description = "患者姓名")
    @TableField("patient_name")
    private String patientName;

    @Schema(description = "患者年龄")
    @TableField("patient_age")
    private Integer patientAge;

    @Schema(description = "患者性别：0未知，1男，2女")
    @TableField("patient_gender")
    private Byte patientGender;

    @Schema(description = "诊断结果")
    @TableField("diagnosis")
    private String diagnosis;

    @Schema(description = "医嘱建议")
    @TableField("advice")
    private String advice;

    @Schema(description = "处方总金额")
    @TableField("total_amount")
    private BigDecimal totalAmount;

    @Schema(description = "状态：0待支付，1待配送，2配送中，3已完成，4已取消")
    @TableField("status")
    private Byte status;

    @Schema(description = "租户编号")
    @TableField("tenant_id")
    private Long tenantId;


}